# -*- coding: UTF-8 -*-


def test01():
    print(int('11101', 2))
    print(bin(10))
    # 元组
    print('age=%d,name=%s' % (10, '111'))
    abc = list('abc')
    print(','.join(abc))
    # vars 没有参数等价于 locals() ,有参数等价于 obj.__dict__
    print(vars())


def test02():
    ...
    person = {'age': 21, 'name': 'zhangsan'}
    print('age=%(age)d, name=%(name)s' % person)


def test03():
    ...
    chars = list('abcdef')
    print('first:{0[0]},seconde:{0[1]}'.format(chars))


def test04():
    ...
    person = {'age': 21, 'name': 'zhangsan'}
    print('age:{0[age]},name:{0[name]}'.format(person))
    print('age:{per[age]},name:{per[name]}'.format(per=person))


def test05():
    ...
    a = 30
    # b = '22' if a > 20 else '11'
    b = 30
    print(b)
    c = 24
    # a==b and b > c
    print(a is b > c)


if __name__ == '__main__':
    ...
    test05()
